// D3D9VertexBuffer.h

#ifndef __D3D9VERTEXBUFFER_H__
#define __D3D9VERTEXBUFFER_H__

class CD3D9VertexBuffer
{
private:
	IDirect3DVertexBuffer9* m_pVertexBuffer;
public:
	CD3D9VertexBuffer(size_t vertexSize, size_t numVertices, DWORD dwUsage, LPDIRECT3DDEVICE9 pDev);
	~CD3D9VertexBuffer();

	// non-const method
	void read();
	void write(size_t offset, size_t length, const void* pSource, bool bDiscardWholeBuffer);

	// const method
	IDirect3DVertexBuffer9* GetBuffer(void) const;
};

#endif